package cn.jji8.createX;

import cn.jji8.createX.function.fill.canPlaceBlock.FillCanPlaceBlockState;
import cn.jji8.createX.function.wand.canPlaceBlock.WandFunctionState;
import cn.jji8.createX.manipulate.Menu;
import cn.jji8.createX.manipulate.Selector;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.event.player.PlayerQuitEvent;
import org.bukkit.event.player.PlayerSwapHandItemsEvent;

@SuppressWarnings("unused")
public class Monitor implements Listener {
    /**
     * 玩家与方块交互事件
     * */
    @SuppressWarnings("unused")
    @EventHandler
    public void PlayerInteractEvent(PlayerInteractEvent a){
        Selector.PlayerInteractEvent(a);//传递给Selector处理
    }
    /**
     * 玩家按F事件
     * */
    @SuppressWarnings("unused")
    @EventHandler
    public void PlayerSwapHandItemsEvent(PlayerSwapHandItemsEvent a){
        Menu.PlayerSwapHandItemsEvent(a);//传递给menu处理
    }
    /**
     * 玩家退出
     * */
    @SuppressWarnings("unused")
    @EventHandler
    public void PlayerQuitEvent(PlayerQuitEvent a){
        FillCanPlaceBlockState.playerQuitEvent(a);//传递给FillCanPlaceBlockState处理
        WandFunctionState.playerQuitEvent(a);//传递给WandFunctionState处理
    }
}
